package com.ruoyi.hov.controller;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.hov.service.HovDtlService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * hov细表 前端控制器
 * </p>
 *
 * @author XiaShiLong
 * @since 2021-04-01
 */
@RestController
@RequestMapping("/hovDtl")
@Api("hov细表")
public class HovDtlController extends BaseController {

    private final HovDtlService service;

    @Autowired
    public HovDtlController(HovDtlService service) {
        this.service = service;
    }

    @PreAuthorize("@ss.hasPermi('hovDtl:get:getAll')")
    @ApiOperation("获取所有")
    @GetMapping("/getAll/{hovId}")
    public AjaxResult getAll(@PathVariable Long hovId) {
        return AjaxResult.success(service.getByHovId(hovId));
    }
}
